import {
  IsEmail,
  IsNotEmpty,
  MaxLength,
  MinLength
} from 'class-validator';

export class SigninDto {
  @IsNotEmpty()
  @IsEmail()
  account: string = undefined;

  @IsNotEmpty()
  @MinLength(8, { message: 'The length of the password cannot be less than 8 characters.' })
  @MaxLength(16, { message: 'The length of the password cannot be greater than 16 characters.' })
  password: string = undefined;
}